import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { Types as MongooseTypes } from 'mongoose';
@Schema()
export class Types {
    @Prop({ tyep: String })
    title: string;
    @Prop({ type: MongooseTypes.ObjectId, ref: 'Types', default: null })
    prent: MongooseTypes.ObjectId;
    @Prop({ type: String })
    text: string
    @Prop({ type: String })
    parenttitle: string
    @Prop({ type: Array })
    children: Array<any>

}
export const TypesSchema = SchemaFactory.createForClass(Types)